package sctu.edu.java.year2016.team07.wenjia.day20160523.chapter6_3;

import java.util.Date;
import java.util.Locale;

/**
 * Created by 001 on 2016/5/23.
 * 将今天的全部信息格式化后输出，再将日期以“年-月-日”的格式输出
 */
public class geshihuariqi {
    public static void main(String[] args){
        Date today=new Date();
        String a=String.format(Locale.CHINA,"%tB",today);
        String b=String.format(Locale.CHINA,"%ta",today);
        String c=String.format("%tF",today);

        System.out.println("格式化后的字符串为月份的中文缩写: "+a);
        System.out.println("格式后的字符串为星期: "+b);
        System.out.println("格式化后今天的日期是:"+c);
    }
}
